package com.andnnl.function;

import java.util.Arrays;
import java.util.List;
import java.util.concurrent.CompletableFuture;
import java.util.function.BiFunction;
import java.util.function.Function;

/**
 * Created by chenss on 2023/7/7.
 */
public class SplitFuncTest {
    public static void main(String[] args) {

//        CompletableFuture.supplyAsync()

        List<String> list= Arrays.asList("asdf","123");
        test1(list,l1->l1);
        test2(list,2,(s,l1)->l1);
    }

    public static <T> List<T> test1(List<T> list,Function<List<T>,List<T>> f){
        return f.apply(list);
    }
    public static <T> List<T> test2(List<T> list,int size, BiFunction<Integer,List<T>,List<T>> f){
        return f.apply(size,list);
    }
}
